home *** CD-ROM | disk | FTP | other *** search
/ CD Concept 6 / CD Concept 06.iso / mac / UTILITAIRE / RLaB / rlib / isinf.r < prev    next >
Text File  |  1994-02-21  |  415b  |  17 lines

  1. //-------------------------------------------------------------------//
  2.  
  3. //  Syntax:    isinf ( X )
  4.  
  5. //  Description:
  6.  
  7. //  Isinf returns a matrix the same size as X containing zeros and
  8. //  ones. The ones locate the values in X that are infinte.
  9.  
  10. //-------------------------------------------------------------------//
  11.  
  12. isinf = function ( X )
  13. {
  14.   return ones (size (X))*inf() == X || ones (size (X))* -inf() == X;
  15. };
  16.  
  17.